﻿@model S4Store.Models.Markting.WZZXKPIHistoryModel
@{
    Layout = null;
    ViewBag.Title = "WZZXKPIHistory";

    S4Store.Models.Chart.Line ChartModel1 = new S4Store.Models.Chart.Line();
    ChartModel1.Name = "发帖执行率";
    ChartModel1.YAxis = "比率(%)";
    S4Store.Models.Chart.ChartSeries series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "网站1发帖率";
    S4Store.Models.Chart.ChartSeries series2= new S4Store.Models.Chart.ChartSeries();
    series2.Name = "网站2发帖率";
    ChartModel1.Serieses.Add(series1);
    ChartModel1.Serieses.Add(series2);
    for (DateTime dt = Model.Start; dt <= Model.End; dt = dt.AddMonths(1))
    {
        ChartModel1.XAxis.Add(dt.ToString("M月"));
        var report = Model.Reports.FirstOrDefault(t => t.Year == dt.Year && t.Month == dt.Month);
        series1.Data.Add(report.NetMarketingMonthData.WZ1FDLV);
        series2.Data.Add(report.NetMarketingMonthData.WZ2FDLV);
    }


    S4Store.Models.Chart.Line ChartModel2 = new S4Store.Models.Chart.Line();
    ChartModel2.Name = "网站集客进度差异";
    ChartModel2.YAxis = "比率(%)";
    series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "网站1集客进度差异";
    series1.Precision = 4;
    series2 = new S4Store.Models.Chart.ChartSeries();
    series2.Name = "网站2集客进度差异";
    series2.Precision = 4;
    ChartModel2.Serieses.Add(series1);
    ChartModel2.Serieses.Add(series2);

    for (DateTime dt = Model.Start; dt <= Model.End; dt = dt.AddMonths(1))
    {
        ChartModel2.XAxis.Add(dt.ToString("M月"));
        var report = Model.Reports.FirstOrDefault(t => t.Year == dt.Year && t.Month == dt.Month);
        series1.Data.Add(report.WZ1JKJDDiff);
        series2.Data.Add(report.WZ2JKJDDiff);
    }


}
<div style="height:100%; width:100%; overflow:auto">
@Html.Action("ReportBar", "Common", Model.BarModel)
<div class="pageContent">
	
	<div class="tabs" currentIndex="0" eventType="click">
		<div class="tabsHeader">
			<div class="tabsHeaderContent">
				<ul>
					<li><a href="javascript:;"><span>发帖执行率</span></a></li>
					<li><a href="javascript:;"><span>网站集客进度差异</span></a></li>
				</ul>
			</div>
		</div>
		<div class="tabsContent" >
			<div>
            @Html.Partial("../Chart/Line", ChartModel1)
			</div>
			<div>
            @Html.Partial("../Chart/Line", ChartModel2)
			</div>
		</div>
		<div class="tabsFooter">
			<div class="tabsFooterContent"></div>
		</div>
	</div>
</div>

</div>
